<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="assets/css/css/bootstraplogin.min.css">
<link rel="stylesheet" href="assets/css/css/login.css">
<link rel="stylesheet" href="assets/plugins/growl-notification/colored-theme.min.css">
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
<script src="assets/js/popper.min.js"></script>
<script src="assets/plugins/growl-notification/growl-notification.min.js"></script>
<script src="assets/js/sys.js"></script>
</head>
<body>
	<textarea name="" id="message" cols="30" rows="10" style="resize: none"></textarea><input type="button" value="发送" onclick="javascript:sendMessage();">
</body>
</html>
<script>
	function sendMessage(){
		var textarea = $("#message");
		var message = $("#message").val();
		console.log(message);
		
		$.post(
				"commentAdd.let",
				{mallCommentMessage:message},
				function(data){
					if(data.code == 1){//发送失败
						sys.toastr.warn(data.msg);
					}else{
						textarea.val("");
						sys.toastr.success(data.msg);
					}
				}
				)
	}
</script>